package com.entrogy.dao;

import com.entrogy.bean.GongZhongHaoEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface GongZhongHaoMapper {

	@Select("select * from gongzhonghao where status = 0")
	List<GongZhongHaoEntity> getGongZhongHaoList();
    @Update("update gongzhonghao_token set access_token = #{access_token},expires_in = #{expires_in} where status = 0 and username = #{username}")
	void updateWxToken(@Param("username") String username, @Param("access_token") String access_token, @Param("expires_in") Integer expires_in);
}
